|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.github.droidfu.imageloader.ImageLoader
com.willowtreeapps.android.shared.OAKImageLoader
public class OAKImageLoader
Field Summary | |
---|---|
static int |
INTERNAL_CACHING
|
static int |
NO_DISK_CACHING
|
static int |
PREFER_INTERNAL
|
static int |
PREFER_SD
|
static int |
SD_CACHING
|
static boolean |
spinLoading
|
Fields inherited from class com.github.droidfu.imageloader.ImageLoader |
---|
BITMAP_EXTRA, DEFAULT_POOL_SIZE, DEFAULT_RETRY_HANDLER_SLEEP_TIME, executor, expirationInMinutes, HANDLER_MESSAGE_ID, IMAGE_URL_EXTRA, numRetries |
Method Summary | |
---|---|
static void |
clearCache()
|
protected android.graphics.Bitmap |
downloadImage(boolean toDiskOnly)
|
static android.graphics.drawable.Drawable |
getDefaultError()
|
static android.graphics.drawable.Drawable |
getDefaultLoading()
|
static OAKImageCache |
getImageCache()
|
static String |
getPrintedUrl(String originalUrl,
ImageTransformation... transformations)
|
static void |
initialize(android.content.Context context,
int cacheType)
This method must be called before any other method is invoked on this class. |
static boolean |
isSafeMode()
|
void |
notifyImageLoaded(String url,
android.graphics.Bitmap bitmap)
|
static void |
preCache(String[] urls,
ImageTransformation... transformations)
Downloads images in urls array and applies transformations to each. |
protected byte[] |
retrieveImageData()
Uses a BufferedHttpEntity to write to a byte array, to ensure that the complete data is loaded. |
void |
run()
The job method run on a worker thread. |
static void |
setDefaultError(android.graphics.drawable.Drawable defaultError)
Sets the default error drawable- to use when there was an error in loading the image. |
static void |
setDefaultLoading(android.graphics.drawable.Drawable defaultLoading)
Sets the default "dummy" drawable- to use while loading. |
static void |
setLoading(android.widget.ImageView v,
android.graphics.drawable.Drawable loading)
Sets an image in the loading state. |
static void |
setSafeMode(boolean safeMode,
int bytesPerPixel)
If Safe Mode is enabled, checks are performed to ensure that a bitmap will fit in available memory before it is inflated. |
static void |
setSpinning(android.view.View v)
Gets a "spinning" animation to use with a loading dialog. |
static void |
start(String imageUrl,
android.widget.ImageView imageView)
|
static void |
start(String imageUrl,
android.widget.ImageView imageView,
android.graphics.drawable.Drawable dummyDrawable,
android.graphics.drawable.Drawable errorDrawable)
|
static void |
start(String imageUrl,
android.widget.ImageView imageView,
android.graphics.drawable.Drawable dummyDrawable,
android.graphics.drawable.Drawable errorDrawable,
ImageTransformation... transformations)
|
static void |
start(String imageUrl,
android.widget.ImageView imageView,
ImageTransformation... transformations)
|
protected static void |
start(String imageUrl,
android.widget.ImageView imageView,
OAKImageLoaderHandler handler,
android.graphics.drawable.Drawable dummyDrawable,
android.graphics.drawable.Drawable errorDrawable,
ImageTransformation... transformations)
|
static void |
start(String imageUrl,
OAKImageLoaderHandler handler)
|
static void |
start(String imageUrl,
OAKImageLoaderHandler handler,
android.graphics.drawable.Drawable dummyDrawable,
android.graphics.drawable.Drawable errorDrawable)
|
static void |
start(String imageUrl,
OAKImageLoaderHandler handler,
android.graphics.drawable.Drawable dummyDrawable,
android.graphics.drawable.Drawable errorDrawable,
ImageTransformation... transformations)
|
static void |
start(String imageUrl,
OAKImageLoaderHandler handler,
ImageTransformation... transformations)
|
Methods inherited from class com.github.droidfu.imageloader.ImageLoader |
---|
downloadImage, initialize, initialize, setMaxDownloadAttempts, setThreadPoolSize, start, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NO_DISK_CACHING
public static final int INTERNAL_CACHING
public static final int SD_CACHING
public static final int PREFER_INTERNAL
public static final int PREFER_SD
public static boolean spinLoading
Method Detail |
---|
public static void initialize(android.content.Context context, int cacheType)
context
- the current contextcacheType
- What kind of disk caching, if any, should be used.public static OAKImageCache getImageCache()
public static void start(String imageUrl, OAKImageLoaderHandler handler)
public static void start(String imageUrl, OAKImageLoaderHandler handler, ImageTransformation... transformations)
public static void start(String imageUrl, android.widget.ImageView imageView, android.graphics.drawable.Drawable dummyDrawable, android.graphics.drawable.Drawable errorDrawable)
public static void start(String imageUrl, android.widget.ImageView imageView, android.graphics.drawable.Drawable dummyDrawable, android.graphics.drawable.Drawable errorDrawable, ImageTransformation... transformations)
public static void start(String imageUrl, android.widget.ImageView imageView)
public static void start(String imageUrl, android.widget.ImageView imageView, ImageTransformation... transformations)
public static void start(String imageUrl, OAKImageLoaderHandler handler, android.graphics.drawable.Drawable dummyDrawable, android.graphics.drawable.Drawable errorDrawable, ImageTransformation... transformations)
public static void start(String imageUrl, OAKImageLoaderHandler handler, android.graphics.drawable.Drawable dummyDrawable, android.graphics.drawable.Drawable errorDrawable)
protected static void start(String imageUrl, android.widget.ImageView imageView, OAKImageLoaderHandler handler, android.graphics.drawable.Drawable dummyDrawable, android.graphics.drawable.Drawable errorDrawable, ImageTransformation... transformations)
public static String getPrintedUrl(String originalUrl, ImageTransformation... transformations)
public static void preCache(String[] urls, ImageTransformation... transformations)
urls
- transformations
- public void run()
ImageLoader
run
in interface Runnable
run
in class ImageLoader
public void notifyImageLoaded(String url, android.graphics.Bitmap bitmap)
notifyImageLoaded
in class ImageLoader
protected android.graphics.Bitmap downloadImage(boolean toDiskOnly)
toDiskOnly
-
protected byte[] retrieveImageData() throws IOException
retrieveImageData
in class ImageLoader
IOException
public static void clearCache()
public static android.graphics.drawable.Drawable getDefaultLoading()
public static void setDefaultLoading(android.graphics.drawable.Drawable defaultLoading)
defaultLoading
- public static android.graphics.drawable.Drawable getDefaultError()
public static void setDefaultError(android.graphics.drawable.Drawable defaultError)
defaultError
- the Drawable of the default error image.public static void setSpinning(android.view.View v)
public static void setLoading(android.widget.ImageView v, android.graphics.drawable.Drawable loading)
v
- loading
- public static boolean isSafeMode()
public static void setSafeMode(boolean safeMode, int bytesPerPixel)
safeMode
- bytesPerPixel
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |